<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>欢迎访问产品运营互动中心！</title>
		<script src="<s:url value="/script/jquery_last.js"/>" type="text/javascript"></script>
<script src="<s:url value="/script/formValidator.js"/>" type="text/javascript" charset="UTF-8"></script>
<script src="<s:url value="/script/formValidatorRegex.js"/>" type="text/javascript" charset="UTF-8"></script>
<script language="javascript" src="<s:url value="/script/DateTimeMask.js"/>" type="text/javascript"></script>
<script language="javascript" src="<s:url value="/script/ShowProcessBar.js"/>" type="text/javascript"></script>
<script type="text/javascript" src="<s:url value="/script/selfResize.js"/>"></script>
<link rel="stylesheet" href="<s:url value="/css/style_new.css"/>">
<link rel="stylesheet" href="<s:url value="/css/validator.css"/>">
<script>
function initLoad(){
	f_iframeResize();
}
window.onload = initLoad;
window.setInterval("initLoad()", 200);
</script>
		<script type="text/javascript" src="<s:url value="/script/selfResize.js"/>"></script>
		<script>
		function show(url){
			window.open(url);
		}
		function initLoad(){
			f_iframeResize();
		}
		window.onload = initLoad;
		$(document).ready(function(){
			$.formValidator.initConfig({autotip:true,onerror:function(msg){alert(msg)}});
			$("select[name='shareReference.referenceType.id']").formValidator({tipid:"referenceTypetip",onshow:"资料类型"}).inputValidator({onerror:"您还没有输入资料类型",empty:{leftempty:false,rightempty:false,emptyerror:"资料类型不能为空"}});
			$("input:text[name='shareReference.title']").formValidator({tipid:"titletip",onshow:"标题"}).inputValidator({min:1,onerror:"您还没有输入标题",empty:{leftempty:false,rightempty:false,emptyerror:"标题两边不能有空符号"}});
			$("textarea[name='shareReference.content']").formValidator({tipid:"contenttip",onshow:"内容"}).inputValidator({min:1,max:300,onerror:"您输入的描述长度不正确,请确认"});
			$("input:text[name='shareReference.keyword']").formValidator({tipid:"keywordtip",onshow:"关键字"}).inputValidator({min:1,onerror:"您还没有输入资料关键字",empty:{leftempty:false,rightempty:false,emptyerror:"关键字两边不能有空符号"}});
		});
		</script>
	</head>

	<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
		<table width="980" border="0" cellspacing="0" cellpadding="0"
			align="center">
			<tr>
				<td>
					<table width="100%" border="0" cellpadding="0" cellspacing="0"
						background="<s:url value="/images/new/gxzl_index_2.gif"/>">
						<tr>
							<td width="20" height="32">
								&nbsp;
							</td>
							<td width="20">
								<img src="<s:url value="/images/new/dq_dot.gif"/>" width="15"
									height="12" />
							</td>
							<td>
								当前位置：<font color="#003399">共享资料</font>
							</td>
							<td width="60">
							</td>
							<td width="200">
							</td>
							<td width="100">
							</td>
						</tr>
					</table>
				</td>
			</tr>


			<tr>
				<td background="" class="leftbg">
					<table width="90%" border="0" cellspacing="0" cellpadding="0"
						align="center" bgcolor="#FFFFFF">
						<tr>
							<td width="20%" valign="top">
								<table width="100%" height="400" border="0" cellspacing="0"
									cellpadding="0" align="center" bgcolor="#FFFFFF">
									<tr>
										<td valign="top" align="center">
											<br>
											<s:form action="saveAnnex.action" namespace="/security"
												method="post" enctype="multipart/form-data"
												onsubmit="return $.formValidator.pageIsValid('1')">
												<input type="hidden" name="shareReference.id" value="${shareReference.id}">
												<input type="hidden" name="shareReference.keyword" value="${shareReference.keyword}">
												<input type="hidden" name="refType" value="${refType}" />
												<table width=98% border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td height="5">
															<table width="100%" border="0" cellspacing="0" cellpadding="0">
																<tr>
																	<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab1.gif"/>" width="5" height="5" /></td>
																	<td class="tdborderup"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
																	<td width="5"><img src="<s:url value="/images/cphdzx_tab2.gif"/>" width="5" height="5" /></td>
																</tr>
															</table>
														</td>
													</tr>
													<tr>
														<td  class="tdborderleftright">
															<TABLE width="98%" cellSpacing=1 cellPadding=0
																align="center">
																<TR height=30>
																	<TD align=left width="10%">
																		<input type="submit" name="Submit" id="Submit" value="保 存">
																		<input type="button" value="返 回"
																			onClick="location.href='<s:url value="/tmp/listAnnex.action"/>'">
																	</TD>
																</TR>
															</table>
															<s:if test="#returnMsg==null">
															</s:if>
															<s:else>
																<TABLE width="98%" cellSpacing=1 cellPadding=0
																	align="center">
																	<TR height=30>
																		<TD align=left width="10%">
																			<font color="red">${returnMsg}</font>
																		</TD>
																	</TR>
																</table>
															</s:else>
															<table width="98%" border="0" cellspacing="0"
																cellpadding="7" align="center" class=tablecolor2>
																<tr>
																	<td width="19%" bgcolor="D6E3FA">
																		<div align="right">
																			<font color="red">*</font>资料类型：
																		</div>
																	</td>
																	<td width="81%">
																		<s:select name="shareReference.referenceType.id"
																			list="lRefType" listKey="id" listValue="name"
																			theme="css_xhtml" />
																		<div id="referenceTypetip" style="width:auto"></div>
																	</td>
																</tr>
																<tr>
																	<td width="19%" bgcolor="D6E3FA">
																		<div align="right">
																			<font color="red">*</font>标&nbsp;&nbsp;&nbsp;&nbsp;题：
																		</div>
																	</td>
																	<td width="81%">
																		<s:textfield name="shareReference.title"
																			theme="css_xhtml" size="64" />
																		<div id="titletip" style="width:auto"></div>
																	</td>
																</tr>
																<tr>
																	<td width="19%" bgcolor="D6E3FA">
																		<div align="right">
																			内&nbsp;&nbsp;&nbsp;&nbsp;容：
																		</div>
																	</td>
																	<td width="81%">
																		<s:textarea name="shareReference.content"
																			theme="css_xhtml" cols="50" rows="6" />
																		<div id="contenttip" style="width:auto"></div>
																	</td>
																</tr>
																<tr>
																	<td width="19%" bgcolor="D6E3FA">
																		<div align="right" class="STYLE2">
																			附&nbsp;&nbsp;&nbsp;&nbsp;件：
																		</div>
																	</td>
																	<td width="81%">
																		<table width="100%" border="0" class=tablecolor2>
																			<tr>
																				<td width="" align="center" bgcolor="D6E3FA">
																					附件名称
																				</td>
																			</tr>
																			<s:iterator value="annexList">
																				<input type="hidden" name="ids" value="<s:property value="id" />" />
																				<tr>
																					<td>
																						<s:property value="fullName" />
																					</td>
																				</tr>
																			</s:iterator>
																		</table>
																		<br />
																	</td>
																</tr>
																<tr>
																	<td width="19%" bgcolor="D6E3FA">
																		<div align="right">
																			发布经理：
																		</div>
																	</td>
																	<td width="81%">
																		<input type="text" id="shareReference.creator"
																			name="shareReference.creator" readonly
																			value="${shareReference.creator}">
																		<input type="button" name="selType" value="选择人员"
																			onClick="selectMainPerson()" />
																	</td>
																</tr>
																<tr>
																	<td width="19%" bgcolor="D6E3FA">
																		<div align="right">
																			密&nbsp;&nbsp;&nbsp;级：
																		</div>
																	</td>
																	<td width="81%">
																		<s:select name="shareReference.secret"
																			list="lSecretType" listKey="id" listValue="name"
																			theme="css_xhtml" />
																	</td>
																</tr>
																<input type="hidden" name="shareReference.begin"
																	value="<s:date name="shareReference.begin" format="yyyy-MM-dd HH:mm:ss"/>">
																<input type="hidden" name="shareReference.end"
																	value="<s:date name="shareReference.end" format="yyyy-MM-dd HH:mm:ss"/>">
															</table>
														</td>
													</tr>
													<tr>
														<td height="5">
															<table width="100%" border="0" cellspacing="0" cellpadding="0">
																<tr>
																	<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab3.gif"/>" width="5" height="5" /></td>
																	<td class="tdborderbottom"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
																	<td width="5"><img src="<s:url value="/images/cphdzx_tab4.gif"/>" width="5" height="5" /></td>
																</tr>
															</table>
														</td>
													</tr>
												</table>
										</td>
									</tr>
								</table>
								</s:form>
	</body>
</html>


<script>

<!--
	function uploadFile(id) {
		window
				.open(
						'<s:url value="/common/uploadFile.action?attach.refEntity=PRODUCTREFERENCE&attach.refEntityID="/>'
								+ id, "uploadfile",
						"dialogWidth=420px;dialogHeight=300px");
	}
	
	function addComponent()
	{
		var uploadHTML=document.createElement("<input type='file'　name='upload'/>");
		document.getElementById("files").appendChild(uploadHTML);
		uploadHTML=document.createElement("<p/>");
		document.getElementById("files").appendChild(uploadHTML);
	}
	
function selectMainPerson(){
    var url="<s:url value='/' escapeAmp='false'/>"+"organ/toOrganTree.action?type=&path=toPersonTree&module=radio&date=<%=System.currentTimeMillis()%>";	 
    var returnData=window.showModalDialog(url,window,"status:no;dialogWidth:650px;dialogHeight:600px;scroll:yes;");
	 if(returnData){
	 	document.all["shareReference.creator"].value=returnData[1];
	 }
}
-->
</script>
